module MC.Money {
	export class tixian {
		public constructor() {
			this.init();
		}
		private init(){
			$('.tixianbtn').click(()=>{
				this.tixian();
			});
		}
		private tixian(){
			let money=$('.yuemone').val();///余额
			let tixianmoney=$('.moneyvalue').val();
			let zhifubao=$('.zhifubao').val();
			let xingming =$('.xingming').val();
			if(tixianmoney>money){
				MC.msg.show('提现金额不能大于余额');
				return;
			}
			if(zhifubao==''){
				MC.msg.show("支付宝必须填写入");
				return;
			}
			if(xingming==''){
				MC.msg.show("姓名必须填写入");
				return;
			}
			MC.api('tixian',{
				tixianmoney:tixianmoney,
				xingming:xingming,
				zhifubao:zhifubao
			},(json:any)=>{
				window.open('/h5/my/money/tixianinfo?out_trade_no='+json,'_self');
				console.log(json);
			});
		}


	}
}